package com.koo.modules.sale.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.koo.common.base.entity.CommonEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @author charlin
 * @email 136137465@qq.com
 * @date 2023-03-16 16:57:09
 */
@Data
@ApiModel("")
@TableName("sale_order_detail")
public class SaleOrderDetailEntity extends CommonEntity {
    private static final long serialVersionUID = 1L;

    @ExcelIgnore
    @TableId
    private Long detailId;

    @ColumnWidth(11)
    @ExcelProperty("销售单")
    @ApiModelProperty(value = "销售单")
    private String saleNo;

    @ColumnWidth(11)
    @ExcelProperty("销售id")
    @ApiModelProperty(value = "销售id")
    private Long saleId;

    @ColumnWidth(11)
    @ExcelProperty("入库单id")
    @ApiModelProperty(value = "入库单id")
    private Long inboundId;

    @ColumnWidth(11)
    @ExcelProperty("入库单编号")
    @ApiModelProperty(value = "入库单编号")
    private String inboundNo;

    @ColumnWidth(11)
    @ExcelProperty("产品id")
    @ApiModelProperty(value = "产品id")
    private Long productId;

    @ColumnWidth(11)
    @ExcelProperty("产品编号")
    @ApiModelProperty(value = "产品编号")
    private String productCode;

    @ColumnWidth(11)
    @ExcelProperty("是否中药饮片")
    @ApiModelProperty(value = "是否中药饮片")
    private Long isDrugPiece;

    @ColumnWidth(11)
    @ExcelProperty("GSP类型")
    @ApiModelProperty(value = "GSP类型")
    private String gspType;

    @ColumnWidth(11)
    @ExcelProperty("拼音")
    @ApiModelProperty(value = "拼音")
    private String pinyin;

    @ColumnWidth(11)
    @ExcelProperty("条形码")
    @ApiModelProperty(value = "条形码")
    private String barCode;

    @ColumnWidth(11)
    @ExcelProperty("产品名称")
    @ApiModelProperty(value = "产品名称")
    private String productName;

    @ColumnWidth(11)
    @ExcelProperty("通用名称")
    @ApiModelProperty(value = "通用名称")
    private String genericName;

    @ColumnWidth(11)
    @ExcelProperty("产地")
    @ApiModelProperty(value = "产地")
    private String producingArea;

    @ColumnWidth(11)
    @ExcelProperty("规格")
    @ApiModelProperty(value = "规格")
    private String standard;

    @ColumnWidth(11)
    @ExcelProperty("单位")
    @ApiModelProperty(value = "单位")
    private String unit;

    @ColumnWidth(11)
    @ExcelProperty("批号")
    @ApiModelProperty(value = "批号")
    private String approvalNo;

    @ColumnWidth(11)
    @ExcelProperty("生产单位")
    @ApiModelProperty(value = "生产单位")
    private String produceFactory;

    @ColumnWidth(11)
    @ExcelProperty("剂型")
    @ApiModelProperty(value = "剂型")
    private String dosageForm;

    @ColumnWidth(11)
    @ExcelProperty("有效期")
    @ApiModelProperty(value = "有效期")
    private Date expiryDate;

    @ColumnWidth(11)
    @ExcelProperty("生产日期")
    @ApiModelProperty(value = "生产日期")
    private Date produceDate;

    @ColumnWidth(11)
    @ExcelProperty("批号")
    @ApiModelProperty(value = "批号")
    private String batchNo;

    @ColumnWidth(11)
    @ExcelProperty("批次号")
    @ApiModelProperty(value = "批次号")
    private String lotNo;

    @ColumnWidth(11)
    @ExcelProperty("是否处方")
    @ApiModelProperty(value = "是否处方")
    private Integer isRxDrug;

    @ColumnWidth(11)
    @ExcelProperty("是否含麻黄碱")
    @ApiModelProperty(value = "是否含麻黄碱")
    private Integer isEphedrine;

    @ColumnWidth(11)
    @ExcelProperty("是否gmp")
    @ApiModelProperty(value = "是否gmp")
    private Integer isGmp;

    @ColumnWidth(11)
    @ExcelProperty("是否拆零药")
    @ApiModelProperty(value = "是否拆零药")
    private Integer isSplit;

    @ColumnWidth(11)
    @ExcelProperty("是否医保")
    @ApiModelProperty(value = "是否医保")
    private Integer isYiBao;

    @ColumnWidth(11)
    @ExcelProperty("库存")
    @ApiModelProperty(value = "库存")
    private Long stockNum;

    @ColumnWidth(11)
    @ExcelProperty("销售数量")
    @ApiModelProperty(value = "销售数量")
    private Long saleNum;

    @ColumnWidth(11)
    @ExcelProperty("成本价")
    @ApiModelProperty(value = "成本价")
    private BigDecimal costPrice;

    @ColumnWidth(11)
    @ExcelProperty("成本金额")
    @ApiModelProperty(value = "成本金额")
    private BigDecimal costFee;

    @ColumnWidth(11)
    @ExcelProperty("原价=本地零售价为0取官方零售价，本地零售价不为0取本地零售价    有会员取会员价；")
    @ApiModelProperty(value = "原价=本地零售价为0取官方零售价，本地零售价不为0取本地零售价    有会员取会员价；")
    private BigDecimal originalPrice;

    @ColumnWidth(11)
    @ExcelProperty("原价金额")
    @ApiModelProperty(value = "原价金额")
    private BigDecimal originalFee;

    @ColumnWidth(11)
    @ExcelProperty("出售价 默认和原价一样的   但有改价、打折、优惠等在POS收银时修改价格这个售价就要变动 ")
    @ApiModelProperty(value = "出售价 默认和原价一样的   但有改价、打折、优惠等在POS收银时修改价格这个售价就要变动 ")
    private BigDecimal salePrice;

    @ColumnWidth(11)
    @ExcelProperty("出售金额")
    @ApiModelProperty(value = "出售金额")
    private BigDecimal saleFee;

    @ColumnWidth(11)
    @ExcelProperty("指导价")
    @ApiModelProperty(value = "指导价")
    private BigDecimal retailPrice;

    @ColumnWidth(11)
    @ExcelProperty("指导金额")
    @ApiModelProperty(value = "指导金额")
    private BigDecimal retailFee;

    @ColumnWidth(11)
    @ExcelProperty("商品成本批发价")
    @ApiModelProperty(value = "商品成本批发价")
    private BigDecimal tradePrice;

    @ColumnWidth(11)
    @ExcelProperty("商品成本额")
    @ApiModelProperty(value = "商品成本额")
    private BigDecimal tradeFee;

    @ColumnWidth(11)
    @ExcelProperty("会员价")
    @ApiModelProperty(value = "会员价")
    private BigDecimal memberPrice;

    @ColumnWidth(11)
    @ExcelProperty("会员金额")
    @ApiModelProperty(value = "会员金额")
    private BigDecimal memberFee;

    @ColumnWidth(11)
    @ExcelProperty("折扣")
    @ApiModelProperty(value = "折扣")
    private BigDecimal discount;

    @ColumnWidth(11)
    @ExcelProperty("折扣金额")
    @ApiModelProperty(value = "折扣金额")
    private BigDecimal discountFee;

    @ColumnWidth(11)
    @ExcelProperty("0:线下支付， 1：线上支付")
    @ApiModelProperty(value = "0:线下支付， 1：线上支付")
    private Integer isOnlinePay;

    @ColumnWidth(11)
    @ExcelProperty("订单类型 1:销售订单, -1:退货订单")
    @ApiModelProperty(value = "订单类型 1:销售订单, -1:退货订单")
    private Integer saleType;

    @ColumnWidth(11)
    @ExcelProperty("满足了促销 0:没有， 1达到， 如果达到则 把促销id与赠品名称添加到数据库")
    @ApiModelProperty(value = "满足了促销 0:没有， 1达到， 如果达到则 把促销id与赠品名称添加到数据库")
    private Integer hasPromotion;

    @ColumnWidth(11)
    @ExcelProperty("促销减少金额")
    @ApiModelProperty(value = "促销减少金额")
    private BigDecimal promotionReduceFee;

    @ColumnWidth(11)
    @ExcelProperty("促销产品id")
    @ApiModelProperty(value = "促销产品id")
    private String promotionProductId;

    @ColumnWidth(11)
    @ExcelProperty("促销名称")
    @ApiModelProperty(value = "促销名称")
    private String promotionName;

    @ColumnWidth(11)
    @ExcelProperty("促销赠送产品数")
    @ApiModelProperty(value = "促销赠送产品数")
    private Long promotionGiveNum;

    @ColumnWidth(11)
    @ExcelProperty("赠品总成本金额")
    @ApiModelProperty(value = "赠品总成本金额")
    private BigDecimal promotionGiveFee;

    @ColumnWidth(11)
    @ExcelProperty("促销赠品名称")
    @ApiModelProperty(value = "促销赠品名称")
    private String promotionGiveProductNames;

    @ColumnWidth(11)
    @ExcelProperty("促销赠品ids,用,分割")
    @ApiModelProperty(value = "促销赠品ids,用,分割")
    private String promotionGiveProductIds;

    @ColumnWidth(11)
    @ExcelProperty("暂停促销")
    @ApiModelProperty(value = "暂停促销")
    private Integer isPausePromotion;

    @ColumnWidth(11)
    @ExcelProperty("商品类别id")
    @ApiModelProperty(value = "商品类别id")
    private Long categoryId;

    @ColumnWidth(11)
    @ExcelProperty("营业员id")
    @ApiModelProperty(value = "营业员id")
    private Long saleUserId;

    @ColumnWidth(11)
    @ExcelProperty("营业员")
    @ApiModelProperty(value = "营业员")
    private String saleUser;

    @ColumnWidth(11)
    @ExcelProperty("1：是赠品， 0或null 正常销售")
    @ApiModelProperty(value = "1：是赠品， 0或null 正常销售")
    private Integer isGiveProduct;

    @ColumnWidth(11)
    @ExcelProperty("赠品对应的原品产品号")
    @ApiModelProperty(value = "赠品对应的原品产品号")
    private String giveProdcutParentCode;

    @ColumnWidth(11)
    @ExcelProperty("1:表示有提成，0:表示没有")
    @ApiModelProperty(value = "1:表示有提成，0:表示没有")
    private Integer isCommission;

    @ColumnWidth(11)
    @ExcelProperty("提成比例")
    @ApiModelProperty(value = "提成比例")
    private BigDecimal commissionRadio;

    @ColumnWidth(11)
    @ExcelProperty("提成金额")
    @ApiModelProperty(value = "提成金额")
    private BigDecimal commissionFee;

    @ColumnWidth(11)
    @ExcelProperty("优惠券信息")
    @ApiModelProperty(value = "优惠券信息")
    private String couponInfo;

    @ColumnWidth(11)
    @ExcelProperty("是否奖励0否1是")
    @ApiModelProperty(value = "是否奖励0否1是")
    private Integer isReward;

    @ColumnWidth(11)
    @ExcelProperty("奖励发放状态0未发放1已发放2退款奖励退回中3退款奖励已退回")
    @ApiModelProperty(value = "奖励发放状态0未发放1已发放2退款奖励退回中3退款奖励已退回")
    private Integer rewardState;

    @ColumnWidth(11)
    @ExcelProperty("奖励产品ID")
    @ApiModelProperty(value = "奖励产品ID")
    private String rewardProductId;

    @ColumnWidth(11)
    @ExcelProperty("奖励金额")
    @ApiModelProperty(value = "奖励金额")
    private BigDecimal rewardFee;

    @ColumnWidth(11)
    @ExcelProperty("奖励发放时间")
    @ApiModelProperty(value = "奖励发放时间")
    private String rewardDate;


}
